﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CallReasonsByAgent.aspx.cs" Inherits="GMAC.ReportingSystem.Paginas.CallReasonsByAgent" Theme="Theme" EnableTheming="true"
    EnableEventValidation="false" EnableViewState="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<style type="text/css">
.probando
{
    margin-left: 200px;
    margin-right: 200px;
}
</style>

<head id="Head1" runat="server">
 
    <title></title>
 
    <link href="../App_Themes/Theme/WSStyle1.css" rel="stylesheet" type="text/css" /> 
    
    <script type="text/javascript" src="../Scripts/CheckFramesAndRedirect.js"></script>

    <script type="text/javascript">

    function ExpandPanel() 
    {
         var pnlDetailsExtender = $find("pnlDetailsExtender");
         var pnlSearchExtender  = $find("pnlSearchExtender");
         
         if (pnlDetailsExtender != null) 
         {         
             pnlDetailsExtender.expandPanel();
             pnlSearchExtender.collapsePanel();
         }
     }

     //----------

     function CheckNullValue(object)
     {
         if (object.value.length == 0) 
         {
             object.value = "0";
         }
     }

     //-----------------------
     // Ajax Handlers
     //-----------------------

     function BeginRequestHandler(sender, args) 
     {
         var btnSave           = document.getElementById("btnSave");
         btnSave.style.display = "none";
     }

     //----------

     function EndRequestHandler(sender, args) 
     {
         var imgLoaderSearch = $get("imgLoaderSearch");
         var btnSave         = document.getElementById("btnSave");

         btnSave.style.display         = "";
         imgLoaderSearch.style.display = "none";
     }

     //----------

    //TODO: Registrar Handler en el (Document Ready)

    function registerHandlers()
    {
         var prm = Sys.WebForms.PageRequestManager.getInstance();

         prm.add_beginRequest(BeginRequestHandler);
         prm.add_endRequest(EndRequestHandler);
    }

    </script>
    
    <!-- ------------------------------------------- -->
    
    <style type="text/css">
        .style1
        {
            width: 348px;
        }
    </style>
    
    <!-- ------------------------------------------- -->
    
</head>
<body class="TotalBody">
    <asp:Panel runat="server" ID="panelContainer">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnableScriptGlobalization="true">
    </asp:ScriptManager> 
    <div class="Contenedor" style = "padding-bottom: 10px; padding-top:10px;">    
        <table cellpadding="0" cellspacing="0" border="0" style="width: 98%; vertical-align: top">
            <tr>
                <td style="text-align: left">
                    <span class = "FontArialPaddingLeft20 TitleFontBlue FontArialBoldCaps">CALL 
                    REASONS BY AGENT</span></td>
            </tr>
            <tr>                                           
                <td style="text-align: left; padding-left: 100px;">
                <div class="WindowHeightMain">
                
                <table width="100%" cellpadding="0px" cellspacing="0px">
                       <tr>
                            <td class="TDSeparadorV"></td>
                        </tr>
                        <tr class="SearchBackground" style="width: 100%">
                            <td class="TDBorder">
                                <table cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                        <td style="padding-left: 10px; text-align: left; width: 100%">
                                            <span class="FontArialBoldCaps" style="font-size: 14px">Search filter</span>
                                        </td>
                                        <td style="padding-right: 10px; text-align: right">
                                            <asp:ImageButton ID="imgCollapseSearch" ImageAlign="Middle" ImageUrl="~/App_Themes/Theme/Images/Images IE6/Minus.gif"
                                            Width="25px" Height="25px" OnClientClick="return false;" runat="server" 
                                                BorderWidth="0px" TabIndex="1" />
                                        </td>
                                    </tr>
                                </table>                                
                            </td>
                        </tr>
                        <tr>
                            <td>

                                <!-- --------------------------------------------------------- -->
                                <!-- Search Panel                                              -->
                                <!-- --------------------------------------------------------- -->                            
                            
                                <asp:Panel ID="pnlSearch"  runat="server" SkinID="pnlBusqueda" Height="130px">
                                    <table cellpadding="0" cellspacing="0" border="0" visible="false">
                                        <tr>
                                            <td valign="top" class="style1">
                                                <table cellpadding="0" cellspacing="0" border="0">
                                                
                                                    <tr style="padding-left: 10px">
                                                        <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                            Product Type
                                                        </td>
                                                        <td class="TDTextBox">
                                                            
                                                            <asp:DropDownList ID="ddlProductType" runat="server" Height="22px" 
                                                            SkinID="ddl12px" TabIndex="2" Width="135px">
                                                            </asp:DropDownList>
                                                                                                                    
                                                            <asp:RequiredFieldValidator ID="rfvProductType" runat="server" ControlToValidate="ddlProductType"
                                                                ErrorMessage="You must select a Product" Display="Dynamic">*</asp:RequiredFieldValidator>
                                                                
                                                             <cc1:ValidatorCalloutExtender ID="rfvProductType_ValidatorCalloutExtender" 
                                                                 runat="server" TargetControlID="rfvProductType">
                                                             </cc1:ValidatorCalloutExtender>
                                                            
                                                        </td>
                                                    </tr>
                                                    <tr style="padding-left: 10px">
                                                        <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                            &nbsp;</td>
                                                        <td class="TDTextBox">
                                                            &nbsp;</td>                      
                                                    </tr>
                                                </table>
                                            </td>
                                            <td class="TDSeparadorH">
                                            </td> 
                                            <td>
                                                <table cellpadding="0" cellspacing="0">
                                                    <tr style="padding-left: 10px">
                                                        <td style="padding-left: 5px" class="LabelRight12px TDLabelBackground">
                                                            Call Date
                                                        </td>
                                                        <td class="TDTextBox">
                                                        
                                                            <asp:TextBox ID="txtDate" runat="server" MaxLength="10" SkinID="TextBox12px"
                                                            TextMode="SingleLine" TabIndex="3"></asp:TextBox>
                                                            
                                                            <cc1:CalendarExtender ID="calendarDate" runat="server" TargetControlID="txtDate">
                                                            </cc1:CalendarExtender>
                                                            
                                                            <cc1:MaskedEditExtender ID="meeDate" runat="server" TargetControlID="txtDate"
                                                                MaskType="Date" Mask="99/99/9999">
                                                            </cc1:MaskedEditExtender>
                                                           
                                                            <cc1:MaskedEditValidator ID="maskedDate" runat="server" Display="Dynamic"
                                                                InvalidValueMessage="*" ToolTip="Wrong date" ControlExtender="meeDate"
                                                                ControlToValidate="txtDate"></cc1:MaskedEditValidator>

                                                            <asp:RangeValidator ID="rvDate" runat="server" ControlToValidate="txtDate" 
                                                                MinimumValue="01/01/1900" MaximumValue="06/06/2079" Type="Date"
                                                                ErrorMessage="Date out of valid range">*</asp:RangeValidator>
                                                                
                                                             <asp:RequiredFieldValidator ID="rfv_txtDate" runat="server" ControlToValidate="txtDate"
                                                                ErrorMessage="You must specify a Date" Display="Dynamic">*</asp:RequiredFieldValidator>
                                                                
                                                             <cc1:ValidatorCalloutExtender ID="vce_rfv_txtDate" 
                                                                 runat="server" TargetControlID="rfv_txtDate">
                                                             </cc1:ValidatorCalloutExtender>
                                                           
                                                            <cc1:ValidatorCalloutExtender ID="vceDate" runat="server" TargetControlID="maskedDate">
                                                            </cc1:ValidatorCalloutExtender>
                                                            <cc1:ValidatorCalloutExtender ID="vceDate2" runat="server" TargetControlID="rvDate">
                                                            </cc1:ValidatorCalloutExtender>
                                                        </td>
                                                    </tr>
                                                    <tr style="padding-left: 10px">
                                                        <td id="Botones" colspan="2" align="center" style="vertical-align: middle; width:20%;">
                                                             <asp:ImageButton ID="imgBuscarReg" runat="server" ImageAlign="Middle" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Find.jpg"
                                                                CausesValidation="true" TabIndex="4" onclick="imgBuscarReg_Click" />
                                                        </td>                                                         
                                                    </tr>                                                                                                        
                                                </table>
                                            </td>                                            
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <cc1:CollapsiblePanelExtender ID="pnlSearch_Collapse" runat="server" TargetControlID="pnlSearch"
                                    BehaviorID="pnlSearchExtender" CollapsedImage="~/App_Themes/Theme/Images/Images IE6/Plus.gif"
                                    ExpandedImage="~/App_Themes/Theme/Images/Images IE6/Minus.gif" CollapseControlID="imgCollapseSearch"
                                    ExpandControlID="imgCollapseSearch" Collapsed="false" SuppressPostBack="false"
                                    ImageControlID="imgCollapseSearch">
                                </cc1:CollapsiblePanelExtender>                                
                            </td>
                        </tr>
                </table>
                
                <!-- --------------------------------------------------------- -->
                <!-- Panel GridView                                            -->
                <!-- --------------------------------------------------------- -->    
                    
                <asp:UpdatePanel ID="upResults" runat="server">
                    <ContentTemplate>
                    <table cellpadding="0" cellspacing="0" border="0" style="padding-right:50px; width: 100%; vertical-align: top">
                            <tr>
                                <td class="TDSeparadorV">
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left">

                                            <asp:GridView ID="grvResults" runat="server" SkinID="GridGMAC" AutoGenerateColumns="False"
                                                Width="100%" EnableViewState="true"
                                                onrowcommand="grvResults_RowCommand" 
                                                onrowdatabound="grvResults_RowDataBound" TabIndex="5">
                                                <Columns>                                                
                                                </Columns>
                                                <HeaderStyle HorizontalAlign="Center" />
                                            </asp:GridView>                               
                                </td>
                            </tr>                                                                                
                            <tr>
                                <td style="text-align: right">&nbsp;</td>
                            </tr>                                                                                
                        </table>
                    
                    <table width="100%" cellpadding="0px" cellspacing="0px">
                        <tr>
                            <td style="text-align: left">
                                
                                <img id="imgLoaderSearch" src="~/App_Themes/Theme/Images/loader.gif" style="display:none" alt="" />
                                
                                <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Save.jpg"
                                    OnClick="btnSave_Click" CausesValidation="true" 
                                    ValidationGroup="DynamicData" TabIndex="6" />
                            </td>
                        </tr>                                                                                
                     </table>
                     
                     </ContentTemplate>
                     <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="imgBuscarReg" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel> 
                 
                </div>
                </td>            
            </tr>        
        </table>    
    </div>
    
    <!-- --------------------------------------------------------- -->
    <!-- Panel Message                                             -->
    <!-- --------------------------------------------------------- -->
    
    <asp:UpdatePanel ID="upMessage" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlMessage" runat="server" CssClass="modalPopup" Height="140px" Style="display: none;"
                Width="400px">
                <table width="100%">
                    <tr style="height: 100px">
                        <td style="height: 100%" align="center">
                            <uc1:wucMessage ID="wucMessage" runat="server" />
                        </td>
                    </tr>
                    <tr style="vertical-align: bottom">
                        <td align="center">
                            <asp:ImageButton ID="btnAccept" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg"
                                CausesValidation="false" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="popupExtenderMessage" runat="server" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="pnlMessage" TargetControlID="lnkPopupMessage"
                CancelControlID="btnAccept">
            </cc1:ModalPopupExtender>
            <asp:LinkButton ID="lnkPopupMessage" runat="server"></asp:LinkButton>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    
    </form>
    </asp:Panel>
</body>
</html>

